const { promisify } = require('util');

const downloadGitRepo = require('download-git-repo');
const ora = require('ora');

module.exports.clone = async function(repo, desc) {
  const download = promisify(downloadGitRepo);
  const process = ora(`下载...${repo}`);
  process.start();
  await download(repo, desc);
  process.succeed();
}
